﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.MapNotificationTypes.DeathMapNotification
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System.Collections.Generic;
using TaleWorlds.CampaignSystem.Actions;
using TaleWorlds.Core;
using TaleWorlds.Localization;
using TaleWorlds.SaveSystem;

#nullable disable
namespace TaleWorlds.CampaignSystem.MapNotificationTypes
{
  public class DeathMapNotification : InformationData
  {
    internal static void AutoGeneratedStaticCollectObjectsDeathMapNotification(
      object o,
      List<object> collectedObjects)
    {
      ((InformationData) o).AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
      base.AutoGeneratedInstanceCollectObjects(collectedObjects);
      collectedObjects.Add((object) this.VictimHero);
      collectedObjects.Add((object) this.KillerHero);
      CampaignTime.AutoGeneratedStaticCollectObjectsCampaignTime((object) this.CreationTime, collectedObjects);
    }

    internal static object AutoGeneratedGetMemberValueVictimHero(object o)
    {
      return (object) ((DeathMapNotification) o).VictimHero;
    }

    internal static object AutoGeneratedGetMemberValueKillerHero(object o)
    {
      return (object) ((DeathMapNotification) o).KillerHero;
    }

    internal static object AutoGeneratedGetMemberValueKillDetail(object o)
    {
      return (object) ((DeathMapNotification) o).KillDetail;
    }

    internal static object AutoGeneratedGetMemberValueCreationTime(object o)
    {
      return (object) ((DeathMapNotification) o).CreationTime;
    }

    public override TextObject TitleText => new TextObject("{=W73My5KO}Death");

    public override string SoundEventPath => "event:/ui/notification/death";

    [SaveableProperty(1)]
    public Hero VictimHero { get; private set; }

    [SaveableProperty(2)]
    public Hero KillerHero { get; private set; }

    [SaveableProperty(3)]
    public KillCharacterAction.KillCharacterActionDetail KillDetail { get; private set; }

    [SaveableProperty(4)]
    public CampaignTime CreationTime { get; private set; }

    public DeathMapNotification(
      Hero victimHero,
      Hero killerHero,
      TextObject descriptionText,
      KillCharacterAction.KillCharacterActionDetail detail,
      CampaignTime creationTime)
      : base(descriptionText)
    {
      this.VictimHero = victimHero;
      this.KillerHero = killerHero;
      this.KillDetail = detail;
      this.CreationTime = creationTime;
    }
  }
}
